import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    namespaced: true,
    state: {
        pagetitle: '',
        // tableData: [
        //   {
        //     num: 1,
        //     id: '1000002',
        //     name: '头孢颗粒',
        //     drugtype: '药品规格',
        //   }
        // ]
        user: {},//用户的基本信息
        routes: []//保存路由
    },
    getters: {
    },
    mutations: {
        navclick (state, val) {
            state.pagetitle = val;
        },
        setUser (state, user) {
            state.user = user;
        },
        setroutes (state, routes) {
            state.routes = routes;
        }
    },
    actions: {
    },
    modules: {
    }
})
